package com.hopes.bizz.poll.alarm.bo;

import com.hopes.bizz.common.core.util.DateUtils;
import com.hopes.bizz.poll.common.constant.enums.PollModDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import lombok.Data;

import java.util.Date;

/**
 * @author daijie
 * @version 1.0
 * @date 2023/10/8 15:29
 * @Description:
 */
@Data
public class PollAlarmGIS {
    /**
     * 监控点
     */
    private Long monitorSiteId;

    /**
     * 报警内容
     */
    private String alarmContent;

    /**
     * 报警时间
     */
    private Date alarmTime;

    /**
     * 报警状态
     */
    private Integer alarmStatus;

    public String getMonitorSiteStr() {
        return DictResolver.getItemLabelByValue(PollModDictEnum.monitor_site, this.monitorSiteId);
    }

    public String getAlarmTimeStr() {
        return DateUtils.formatDate(this.alarmTime, DateUtils.FORMAT_TIME);
    }
}
